package com.example.hxds.mis.api.feign;

import cn.hutool.core.bean.BeanUtil;
import com.example.hxds.common.util.R;
import com.example.hxds.mis.api.controller.form.DeleteVoucherByIdsForm;
import com.example.hxds.mis.api.controller.form.InsertVoucherForm;
import com.example.hxds.mis.api.controller.form.SearchVoucherByPageForm;
import com.example.hxds.mis.api.controller.form.UpdateVoucherStatusForm;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

@FeignClient(value = "hxds-vhr")
public interface VhrServiceApi {
    //查询代金券分页记录
    @PostMapping("/voucher/searchVoucherByPage")
    public R searchVoucherByPage(@RequestBody @Valid SearchVoucherByPageForm form);

    //添加代金券
    @PostMapping("/voucher/insertVoucher")
    public R insertVoucher(@RequestBody @Valid InsertVoucherForm form);

    //更改代金券状态
    @PostMapping("/voucher/updateVoucherStatus")
    public R updateVoucherStatus(@RequestBody @Valid UpdateVoucherStatusForm form);

    //删除代金券
    @PostMapping("/voucher/deleteVoucherByIds")
    public R deleteVoucherByIds(@RequestBody @Valid DeleteVoucherByIdsForm form);
}
